<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>左导航菜单</title>
    <style type="text/css">
        li{list-style: none; line-height: 22px; cursor: pointer;}
        .current{background: #6cf; font-weight: bold; color: #fff;}
    </style>
    <script src="./js/jquery-3.7.1.js"></script>
</head>
<body>
<ul>
    <li id="current">jQuery简介</li>
    <li>jQuery语法</li>
    <li>jQuery选择器</li>
    <li>jQuery事件与动画</li>
    <li>jQuery方法</li>
</ul>
<script>
    $(document).ready(function(){
       $("li").click(function(){
        // $("#current").css("background-color","red");
        $("#current").addClass("current");///要用空格隔开相关的class样式名称
        let a = $("#current").css("background-color");//css参数为1个，获取，两个是设置
        console.log(a);
        
       })
    })
</script>

</body>
</html>